package com.edu.oma.protocol.common;

public class JsonResult<T> {
	private Integer status;
	private String msg;
	private T data;
	
	public JsonResult() {
		super();
	}

	public JsonResult(int status, String msg, T data) {
		super();
		this.status = status;
		this.msg = msg;
		this.data = data;
	}
	
	public JsonResult(T data) {
		super();
		this.status = ResultCode.SUCC_CODE;
		this.msg = ResultCode.SUCC_MSG;
		this.data = data;
	}
	
	public JsonResult(int status, String msg) {
		super();
		this.status = status;
		this.msg = msg;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public T getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	@Override
	public String toString() {
		return "JsonResult [status=" + status + ", msg=" + msg + ", data=" + data + "]";
	}




}
